﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace GameBoardViewer.Board3D
{
    /// <summary>
    /// class declarations for mouse world coordinates detection problem
    /// </summary>
    public class VertexDecl
    {
        public Vector3 Position
        { get; set; }

        public Vector2 Texture
        { get; set; }
    }

    public class IndexDecl
    {
        public short Index1
        { get; set; }

        public short Index2
        { get; set; }

        public short Index3
        { get; set; }
    }

    public class MeshPartDecl
    {
        public MeshPartDecl()
        {
            Vertexes = new List<VertexDecl>();
            Indexes = new List<IndexDecl>();
        }

        public List<VertexDecl> Vertexes
        { get; set; }

        public List<IndexDecl> Indexes
        { get; set; }
    }

    public class ModelMeshDecl
    {
        public List<MeshPartDecl> ModelMeshPart
        { get; set; }

        public ModelMeshDecl()
        {
            ModelMeshPart = new List<MeshPartDecl>();
        }
    }

    public class ModelDecl
    {
        public List<ModelMeshDecl> ModelMesh
        { get; set; }

        public ModelDecl()
        {
            ModelMesh = new List<ModelMeshDecl>();
        }
    }

    public class Intersection
    {
        public Intersection(float _u, float _v, float _t)
        {
            U = _u;
            V = _v;
            T = _t;
        }

        public float U
        { get; set; }

        public float V
        { get; set; }

        public float T
        { get; set; }
    }


    public class IntersectionResult
    {
        public List<VertexDecl> FaceVertices
        { get; set; }

        public Intersection Intersection
        { get; set; }

        public IntersectionResult()
        {
            FaceVertices = new List<VertexDecl>();
        }
    }
}
